<template>
    <van-tabs v-model:active="active">
        <van-tab v-for="item in list" :key="item.id" :title="item.text"></van-tab>
    </van-tabs>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import axios from 'axios'
import { INavItem } from '../types'

const active = ref(0)

// 频道数据
const list = ref<INavItem[]>([])

axios({
    url: '/navList',
    method: 'get'
}).then(res => {
    // console.log(res.data)
    list.value = res.data.result
})
</script>

<style scoped>

</style>